
static int dma_chan = 0;
void slcd_test()
{
		unsigned short *frame;
		unsigned int i;
		
		//jzlcd_init();
		lcd_enter_frame();
		frame = (unsigned short *)lcd_get_current_frame();
		printf("slcd frame = 0x%x\r\n",frame);
		for (i = 0;i < 400 * 240;i++) {
			frame[i] = 0xf81f;
		}
		printf("16-bpp, data = 0x%08x\n",frame[0]);

		lcd_change_frame();
		frame = (unsigned short *)lcd_get_current_frame();
		printf("slcd frame = 0x%x\r\n",frame);
		for (i = 0;i < 400 * 240/2;i++) {
			frame[i] = 0x07ff;
		}
		printf("16-bpp, data = 0x%08x\n", frame[0]);
		for (;i < 400 * 240;i++) {
			frame[i] = 0xffe0;
		}
		printf("16-bpp, data = 0x%08x\n", frame[i-1]);
		
		lcd_change_frame();
		frame = (unsigned short *)lcd_get_current_frame();
		
		for (i = 0;i < 400 * 80;i++) {
			frame[i] = 0x001f;
		}
		printf("16-bpp, data = 0x%08x\n", frame[i-1]);
		for (;i < 400 * 160;i++) {
			frame[i] = 0x07e0;
		}
		printf("16-bpp, data = 0x%08x\n", frame[i-1]);
		for (;i < 400 * 240;i++) {
			frame[i] = 0xf800;
		}
		printf("16-bpp, data = 0x%08x\n", frame[i-1]);
		lcd_change_frame();
//		lcd_reset_frame();
		while (1) {
//			mdelay(1000);
			lcd_change_frame();
			
		}
}